package com.platform.dao;

import com.platform.entity.ProductEntity;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * Dao
 *
 * @author lipengjun
 * @email 939961241@qq.com
 * @date 2017-08-30 14:31:21
 */
public interface ProductDao extends BaseDao<ProductEntity> {
    @Update("update nideshop_product p set p.goods_number = p.goods_number + #{buyNumber} where p.id = #{productId}")
    int increaseGoodsNumber(@Param("productId") Integer productId, @Param("buyNumber") int buyNumber);
}
